package com.betting.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.betting.entity.BetRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;

@Mapper
public interface BetRecordMapper extends BaseMapper<BetRecord> {
    @MapKey("month")
    Map<String, Object> selectMonthlySummary(@Param("start") LocalDateTime start, 
                                            @Param("end") LocalDateTime end);

    BigDecimal selectMonthlyProfit(@Param("start") LocalDateTime start, @Param("end") LocalDateTime end);

    BigDecimal selectDailyProfit(@Param("start") LocalDateTime start, @Param("end") LocalDateTime end);

    BigDecimal selectWeeklyProfit(@Param("start") LocalDateTime start, @Param("end") LocalDateTime end);

    BigDecimal selectTotalBetAmount(@Param("start") LocalDateTime start, @Param("end") LocalDateTime end);
    BigDecimal selectTotalResultAmount(@Param("start") LocalDateTime start, @Param("end") LocalDateTime end);
    Integer selectTotalBetCount(@Param("start") LocalDateTime start, @Param("end") LocalDateTime end);
} 